//
//  Home_two_TableViewCell.m
//  projectBase
//
//  Created by 洪梦萍 on 2017/10/21.
//  Copyright © 2017年 洪梦萍. All rights reserved.
//

#import "Home_two_TableViewCell.h"
#import "SizeHeader.h"
#define zuoyeImg1_tag 1000009
@implementation Home_two_TableViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    [self setFrame:frame];
    if (self)
    {
        _touxiangImg = [[UIImageView alloc]initWithFrame:CGRectMake(ScreenWidth*29/750, ScreenHeight*25/1350, ScreenWidth*36/375, ScreenWidth*36/375)];
        _touxiangImg.image = [UIImage imageNamed:@"图层-1104-拷贝-5"];
        [self addSubview:_touxiangImg];
        
        _teacherName = [[UILabel alloc]initWithFrame:CGRectMake(_touxiangImg.frame.origin.x+_touxiangImg.frame.size.width+ScreenWidth*23/750, ScreenHeight*25/1350, ScreenWidth*55/375, ScreenHeight*18/747)];
        _teacherName.text = @"王老师";
        [self addSubview:_teacherName];
        
        _xuekeLab = [[UILabel alloc]initWithFrame:CGRectMake(ScreenWidth*115/375, _teacherName.frame.origin.y, ScreenWidth*38/375, ScreenHeight*18/747)];
        _xuekeLab.backgroundColor = CJYColor(118, 168, 246);
        _xuekeLab.text = @" 数学";
        [_xuekeLab setTextColor:[UIColor whiteColor]];
        [self addSubview:_xuekeLab];
        
        _homeworkLab = [[UILabel alloc]initWithFrame:CGRectMake(_teacherName.frame.origin.x, _teacherName.frame.origin.y+_teacherName.frame.size.height+ScreenHeight*15/1350, ScreenWidth*72/375, ScreenHeight*18/747)];
        _homeworkLab.font = [UIFont systemFontOfSize:14];
        _homeworkLab.text = @"#家庭作业#";
        _homeworkLab.textColor = MainColor;
        [self addSubview:_homeworkLab];
        
        _homeworkLab2 = [[UILabel alloc]initWithFrame:CGRectMake(_homeworkLab.frame.origin.x+_homeworkLab.frame.size.width+ScreenWidth*15/750, _teacherName.frame.origin.y+_teacherName.frame.size.height+ScreenHeight*15/1350, ScreenWidth*100/375, ScreenHeight*18/747)];
        _homeworkLab2.font = [UIFont systemFontOfSize:14];
        _homeworkLab2.text = @"完成课后作业";
        [self addSubview:_homeworkLab2];
        
        for (int i = 0; i <3; i++)
        {
            UIButton * btn1 = [[UIButton alloc]initWithFrame:CGRectMake(_homeworkLab.frame.origin.x+(ScreenWidth*92/375)*i+(ScreenWidth*15/750)*i, _homeworkLab.frame.origin.y+_homeworkLab.frame.size.height+ScreenHeight*16/1350, ScreenWidth*92/375, ScreenHeight*55/747)];
            [btn1 setImage:[UIImage imageNamed:@"图层-7-拷贝-6"] forState:UIControlStateNormal];
            btn1.tag = zuoyeImg1_tag+i;
            [self addSubview:btn1];
        }
        UIView * line = [[UIView alloc]initWithFrame:CGRectMake(15, ScreenHeight*246/1350-2, ScreenWidth-30, 1.5)];
        line.backgroundColor = UIColorRGB(247);
        [self addSubview:line];
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
